<?php
class Job extends CI_Controller {
	function __construct()
	{
		parent::__construct();
	}
	
	function index($id = NULL) {
		if ($id) $this->view($id);
		else $this->search();
	}
	function search() {
		$this->load->model('Job_model');
		foreach ($this->Job_model->get_job_by_id(1) as $key=>$value)
			$data[$key]=$value;
		
		$this->load->view('job_search',$data);
	}
	function view($id) {
		//$this->load->model('Company_model');
		$this->load->model('Job_model');
		
		foreach ($this->Job_model->get_job_by_id($id) as $key=>$value)
			$data[$key]=$value;
		
		$this->load->view('job_profile',$data);
	}
}
